package com.misspao.lottery.commen;

/**
 * <p>Title: ResultInfo</p>
 * <p>Company:misspao </p>
 *
 * @author: buwenming
 * @Date: Create in 13:50 2018/1/30
 * @Description:
 */
public class ResultInfo {
    private int status;
    private String message;
    private Object data;

    public ResultInfo() {
    }

    public ResultInfo(int status, String message, Object data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public static ResultInfo success(Object data){
        return new ResultInfo(0,"success",data);
    }

    public static ResultInfo success(String msg, Object data){
        return new ResultInfo(0,msg,data);
    }
    public static ResultInfo success(int status, String message, Object data){
        return new ResultInfo(status,message,data);
    }

    public static ResultInfo fail(){
        return new ResultInfo(-1,"fail",null);
    }

    public static ResultInfo fail(String msg){
        return new ResultInfo(-1,msg,null);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
